package com.example.closerest;
 
//import com.mkyong.android.adaptor.MobileArrayAdapter;
import Model.Restaurant;
import Model.restaurantType;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.Toast;
import android.view.View;
 
public class Chinese extends ListActivity {
	
	final String[] rest_name = 
			 new String[] {(new Restaurant(34)).restaurantName, (new Restaurant(45)).restaurantName, (new Restaurant(46)).restaurantName, (new Restaurant(48)).restaurantName};
	static final String[] rest_phoneno = 
            new String[] {(new Restaurant(34)).phoneNumber, (new Restaurant(45)).phoneNumber, (new Restaurant(46)).phoneNumber, (new Restaurant(48)).phoneNumber};
	static final String[] rest_address = 
            new String[] {(new Restaurant(34)).address, (new Restaurant(45)).address, (new Restaurant(46)).address, (new Restaurant(48)).address};
	static final String[] rest_logo = 
			new String[] {(new Restaurant(34)).logoAddress, (new Restaurant(45)).logoAddress, (new Restaurant(46)).logoAddress, (new Restaurant(48)).logoAddress};
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
 
		setListAdapter(new MobileArrayAdapter(this, rest_name,rest_phoneno,rest_address,rest_logo));
 
	}
 
	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
 
		//get selected items
		String selectedValue = (String) getListAdapter().getItem(position);
		Toast.makeText(this, selectedValue, Toast.LENGTH_SHORT).show();
 
	}
 
}

